
#include<iostream>
#include<string>
#include<memory>

#include "HttpServer.hpp"
#include"Log.hpp"
static void Usage(std::string proc)
{
    std::cout<<"Usage: \n\t"<<proc<<"port"<<std::endl;
}

int main(int argc,const char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(4);
    }
    
    //std::cout<<"hello http"<<std::endl;
    uint16_t port=atoi(argv[1]);
    
    std::shared_ptr<HttpServer> http_svr(new HttpServer(port));
    http_svr->InitServer();
    http_svr->Loop();
    


    return 0;
}